package com.naiterui.ehp.bs.agent.entity;

import static javax.persistence.GenerationType.IDENTITY;

import java.io.Serializable;
import java.sql.Timestamp;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.CreationTimestamp;

import lombok.Data;

/**
 * 经纪人统计-药品售卖统计
 * 
 * @author yangfuya
 * @since 2022/2/16
 */
@Data
@Entity
@Table(name = "as_product_count")
public class AsProductCount implements Serializable {
    private static final long serialVersionUID = -3273369968993451342L;

    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "id", unique = true, nullable = false)
    private Long id;

    /**
     * 大区Id
     */
    @Column(name = "area_id")
    private Long areaId;

    /**
     * 省区Id
     */
    @Column(name = "provice_area_id")
    private Long provinceAreaId;

    /**
     * 经纪人Id
     */
    @Column(name = "agent_id")
    private Long agentId;

    /**
     * 医生Id
     */
    @Column(name = "doctor_id")
    private Long doctorId;

    /**
     * 生成时间
     */
    @Column(name = "generate_date")
    private Date generateDate;

    /**
     * 药品id
     */
    @Column(name = "product_id")
    private Long productId;

    /**
     * 药品数量
     */
    @Column(name = "product_number")
    private Integer productNumber;

    /**
     * 药品总额
     */
    @Column(name = "product_price_total")
    private Integer productPriceTotal;

    @Column(name = "created_by")
    private String createdBy;

    @Column(name = "created_at")
    @CreationTimestamp
    private Timestamp createdAt;
}
